import ajax from "./ajax/axios";

export default {
  list: function(data) {
    return ajax({
      url: "/auth/group/list",
      method: "post",
      data: data
    });
  },
  add: function(data) {
    return ajax({
      url: "/auth/group/add",
      method: "post",
      data: data
    });
  },
  update: function(data) {
    return ajax({
      url: "/auth/group/update/",
      method: "post",
      data: data
    });
  },
  info: function(id) {
    return ajax({
      url: "/auth/group/info/" + id,
      method: "get"
    });
  },
  remove: function(id) {
    return ajax({
      url: "/auth/group/remove/" + id,
      method: "get"
    });
  },
  grant: function(data) {
    return ajax({
      url: "/auth/group/grant/",
      method: "post",
      data: data
    });
  },
  ungrant: function(data) {
    return ajax({
      url: "/auth/group/ungrant/",
      method: "post",
      data: data
    });
  },
  options: function() {
    return ajax({
      url: "/auth/group/options/",
      method: "get"
    });
  }
};
